#!python
#
do_full = False

# ------------ MATH TYPES ------------ #
# List of types for Vec types
if do_full:
   vec_types = [ 'ub','b','us','s','f','d','ld']
   vec_sizes = [2,3,4]
else:
   vec_types = [ 'f', 'd' ]
   vec_sizes = [2,3,4]
        

# List of types for Pnt types
if do_full:
   pnt_types = [ 'ub','b','us','s','f','d','ld']
   pnt_sizes = [2,3,4]
else:
   pnt_types = ['f','d']
   pnt_sizes = [2,3,4]

# Colors
color_types =  ['ub','f']               
color_sizes = [3,4]               

type_map = {'ub':'OSG::UInt8',
             'b':'OSG::Int8',
            'us':'OSG::UInt16',
             's':'OSG::Int16',
             'f':'OSG::Real32',
             'd':'OSG::Real64',
            'ld':'OSG::Real128',
        }

class MathTypeInfo(object):
   def __init__(self, type, alias, exposed_name, size, type_str):
      self.type = type
      self.alias = alias
      self.exposed_name = exposed_name
      self.size = size
      self.type_str = type_str
      
# Create VecStorage_typeinfo
# Full type, alias, module_name, size, template_type
vec_storage_typeinfo = []
for size in vec_sizes:
   for vtype in vec_types:
      vec_storage_typeinfo.append( MathTypeInfo("OSG::VecStorage%s<%s>"%(size,type_map[vtype]),
                                    "alias_VecStorage%s%s"%(size,vtype),
                                    "VecStorage%s%s"%(size,vtype),
                                    size, type_map[vtype]))
# Vec types
# Note: We use the osg typedefed type for the base type
# Full type, alias, module_name, size, template_type
vec_typeinfo = []
for size in vec_sizes:
   for vtype in vec_types:
      vec_typeinfo.append( MathTypeInfo("OSG::Vec%s%s"%(size,vtype),
                            "alias_Vec%s%s"%(size,vtype),
                            "Vec%s%s"%(size,vtype),
                            size, type_map[vtype]) )

# Vec types
# Note: We use the osg typedefed type for the base type
# Full type, alias, module_name, size, template_type
pnt_typeinfo = []
for size in pnt_sizes:
   for ptype in pnt_types:
      pnt_typeinfo.append( MathTypeInfo("OSG::Pnt%s%s"%(size,ptype),
                            "alias_Pnt%s%s"%(size,ptype),
                            "Pnt%s%s"%(size,ptype),
                            size, type_map[ptype]) )

# Color types
# Note: We use the osg typedefed type for the base type
# Full type, alias, module_name, size, template_type
color_typeinfo = []
for size in color_sizes:
   for ctype in color_types:
      color_typeinfo.append( MathTypeInfo("OSG::Color%s%s"%(size,ctype),
                              "alias_Color%s%s"%(size,ctype),
                              "Color%s%s"%(size,ctype),
                              size, type_map[ctype]) )                            

# -------- GeoIntegral Types --------- #
geo_integral_types = ["UInt8", "UInt16", "UInt32"]
geo_integral_param_types = ["UInt32"]
geo_integral_prop_names = []
for itype in geo_integral_types:
   geo_integral_prop_names.append("Geo%sProperty"%itype)

# -------- GeoVec Types -------------- #
#geo_types = ["ub","b","us","s", "f", "d", "Nub", "Nb", "Nus","Ns"]
geo_types = ["f","d"]
color_types = ["Color3f","Color4f"]

geo_vec_prop_names = []
for prop_type in geo_types:
   for l in ["2", "3","4"]:
      for base_type in ["Vec","Pnt"]:
         geo_vec_prop_names.append("Geo%sProperty"% "%s%s%s"%(base_type,l,prop_type))

for c in color_types:
   geo_vec_prop_names.append("Geo%sProperty"%c)

# Get a list of the return types for geo vecs
geo_vec_get_value_ret_types = []

for vt in vec_types:
   for s in vec_sizes:
      geo_vec_get_value_ret_types.append("OSG::Vec%s%s"%(s,vt))
for pt in pnt_types:
   for s in pnt_sizes:
      geo_vec_get_value_ret_types.append("OSG::Pnt%s%s"%(s,pt))
geo_vec_get_value_ret_types.extend(["OSG::Color3f","OSG::Color4f"])







